Optimal. Leaf size=157 \[ \frac {a^{3/2} (7 A+12 B+8 C) \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \sec (c+d x)+a}}\right )}{4 d}+\frac {a^2 (5 A+4 B-8 C) \sin (c+d x)}{4 d \sqrt {a \sec (c+d x)+a}}-\frac {a (A-4 C) \sin (c+d x) \sqrt {a \sec (c+d x)+a}}{2 d}+\frac {A \sin (c+d x) \cos (c+d x) (a \sec (c+d x)+a)^{3/2}}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.45, antiderivative size = 157, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 43, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.116, Rules used = {4086, 4018, 4015, 3774, 203} \[ \frac {a^2 (5 A+4 B-8 C) \sin (c+d x)}{4 d \sqrt {a \sec (c+d x)+a}}+\frac {a^{3/2} (7 A+12 B+8 C) \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \sec (c+d x)+a}}\right )}{4 d}-\frac {a (A-4 C) \sin (c+d x) \sqrt {a \sec (c+d x)+a}}{2 d}+\frac {A \sin (c+d x) \cos (c+d x) (a \sec (c+d x)+a)^{3/2}}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rule 3774
Rule 4015
Rule 4018
Rule 4086
Rubi steps
\begin {align*} \int \cos ^2(c+d x) (a+a \sec (c+d x))^{3/2} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx &=\frac {A \cos (c+d x) (a+a \sec (c+d x))^{3/2} \sin (c+d x)}{2 d}+\frac {\int \cos (c+d x) (a+a \sec (c+d x))^{3/2} \left (\frac {1}{2} a (3 A+4 B)-\frac {1}{2} a (A-4 C) \sec (c+d x)\right ) \, dx}{2 a}\\ &=-\frac {a (A-4 C) \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{2 d}+\frac {A \cos (c+d x) (a+a \sec (c+d x))^{3/2} \sin (c+d x)}{2 d}+\frac {\int \cos (c+d x) \sqrt {a+a \sec (c+d x)} \left (\frac {1}{4} a^2 (5 A+4 B-8 C)+\frac {1}{4} a^2 (A+4 B+8 C) \sec (c+d x)\right ) \, dx}{a}\\ &=\frac {a^2 (5 A+4 B-8 C) \sin (c+d x)}{4 d \sqrt {a+a \sec (c+d x)}}-\frac {a (A-4 C) \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{2 d}+\frac {A \cos (c+d x) (a+a \sec (c+d x))^{3/2} \sin (c+d x)}{2 d}+\frac {1}{8} (a (7 A+12 B+8 C)) \int \sqrt {a+a \sec (c+d x)} \, dx\\ &=\frac {a^2 (5 A+4 B-8 C) \sin (c+d x)}{4 d \sqrt {a+a \sec (c+d x)}}-\frac {a (A-4 C) \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{2 d}+\frac {A \cos (c+d x) (a+a \sec (c+d x))^{3/2} \sin (c+d x)}{2 d}-\frac {\left (a^2 (7 A+12 B+8 C)\right ) \operatorname {Subst}\left (\int \frac {1}{a+x^2} \, dx,x,-\frac {a \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{4 d}\\ &=\frac {a^{3/2} (7 A+12 B+8 C) \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{4 d}+\frac {a^2 (5 A+4 B-8 C) \sin (c+d x)}{4 d \sqrt {a+a \sec (c+d x)}}-\frac {a (A-4 C) \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{2 d}+\frac {A \cos (c+d x) (a+a \sec (c+d x))^{3/2} \sin (c+d x)}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.78, size = 117, normalized size = 0.75 \[ \frac {a \sec \left (\frac {1}{2} (c+d x)\right ) \sqrt {a (\sec (c+d x)+1)} \left (\sqrt {2} (7 A+12 B+8 C) \sin ^{-1}\left (\sqrt {2} \sin \left (\frac {1}{2} (c+d x)\right )\right ) \sqrt {\cos (c+d x)}+2 \sin \left (\frac {1}{2} (c+d x)\right ) ((7 A+4 B) \cos (c+d x)+A \cos (2 (c+d x))+A+8 C)\right )}{8 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.62, size = 340, normalized size = 2.17 \[ \left [\frac {{\left ({\left (7 \, A + 12 \, B + 8 \, C\right )} a \cos \left (d x + c\right ) + {\left (7 \, A + 12 \, B + 8 \, C\right )} a\right )} \sqrt {-a} \log \left (\frac {2 \, a \cos \left (d x + c\right )^{2} - 2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right ) + 1}\right ) + 2 \, {\left (2 \, A a \cos \left (d x + c\right )^{2} + {\left (7 \, A + 4 \, B\right )} a \cos \left (d x + c\right ) + 8 \, C a\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{8 \, {\left (d \cos \left (d x + c\right ) + d\right )}}, -\frac {{\left ({\left (7 \, A + 12 \, B + 8 \, C\right )} a \cos \left (d x + c\right ) + {\left (7 \, A + 12 \, B + 8 \, C\right )} a\right )} \sqrt {a} \arctan \left (\frac {\sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right ) - {\left (2 \, A a \cos \left (d x + c\right )^{2} + {\left (7 \, A + 4 \, B\right )} a \cos \left (d x + c\right ) + 8 \, C a\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{4 \, {\left (d \cos \left (d x + c\right ) + d\right )}}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 2.15, size = 733, normalized size = 4.67 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 2.16, size = 569, normalized size = 3.62 \[ \frac {\sqrt {\frac {a \left (1+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}\, \left (7 A \sqrt {2}\, \cos \left (d x +c \right ) \sin \left (d x +c \right ) \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {2}}{2 \cos \left (d x +c \right )}\right ) \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {3}{2}}+12 B \sqrt {2}\, \cos \left (d x +c \right ) \sin \left (d x +c \right ) \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {3}{2}} \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {2}}{2 \cos \left (d x +c \right )}\right )+8 C \sqrt {2}\, \cos \left (d x +c \right ) \sin \left (d x +c \right ) \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {3}{2}} \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {2}}{2 \cos \left (d x +c \right )}\right )+7 A \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {2}}{2 \cos \left (d x +c \right )}\right ) \sqrt {2}\, \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {3}{2}} \sin \left (d x +c \right )+12 B \sqrt {2}\, \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {3}{2}} \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {2}}{2 \cos \left (d x +c \right )}\right ) \sin \left (d x +c \right )+8 C \sqrt {2}\, \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {3}{2}} \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {2}}{2 \cos \left (d x +c \right )}\right ) \sin \left (d x +c \right )-8 A \left (\cos ^{4}\left (d x +c \right )\right )-20 A \left (\cos ^{3}\left (d x +c \right )\right )-16 B \left (\cos ^{3}\left (d x +c \right )\right )+28 A \left (\cos ^{2}\left (d x +c \right )\right )+16 B \left (\cos ^{2}\left (d x +c \right )\right )-32 C \left (\cos ^{2}\left (d x +c \right )\right )+32 C \cos \left (d x +c \right )\right ) a}{16 d \cos \left (d x +c \right ) \sin \left (d x +c \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int {\cos \left (c+d\,x\right )}^2\,{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^{3/2}\,\left (A+\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right ) \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________